<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/jsps/common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<base href="<%=basePath%>">

	<title>资金进出记录</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href='<c:url value="/css/application.css"/>'>
	<link rel="stylesheet" type="text/css" href='<c:url value="/css/list.css"/>'>
	<link rel="stylesheet" type="text/css" href='<c:url value="/css/form.css"/>'>
	<script type="text/javascript" src="<c:url value="/js/common.js"/>"></script>

	<script type="text/javascript">
		function validateFrm(){
			with(document.forms[0]){
				if(account_no.value == ''){
					alert("请输入账户编号！");
					account_no.focus();
					return false;
				}
			}
			return true;
		}
		
		function doQuery(pageno){
			if(pageno<1 || pageno>${page.totalPageNum}){
				alert("页号超出范围，有效范围：[1-${page.totalPageNum}]");
				$('pageNo').select();
				return;
			}
			var f=document.forms[0];
			f.action=f.action+"&pageno="+pageno;
			f.submit();
		}
	</script>
<style type="text/css">
	body {
			background:url(pics/bg.jpg);
			-webkit-background-size: cover;
			-moz-background-size: cover;
			background-size: cover;
		}
</style>
</head>

<body>
	<div id="wrapper">
		<div id="title">资金进出记录</div>
		<div id="qryarea">
			<form action=" <c:url value="/accountMgr?act=loadPagedAccountTransinfo"/>" method="post" onSubmit ="return validateFrm();">
				<th>账户编号:</th> 
				<input type="text" name="account_no" size="25" value="${accountno}"> &nbsp;&nbsp;&nbsp; 
				<input type="submit" value=" 查 询 " />
			</form>
		</div>
		
		<div>
			<table id="listtable" cellpadding="0" cellspacing="0" >
				<tr>
					<th>交易流水号</th>
					<th>资金账户编号</th>
					<th>交易类型</th>
					<th>交易金额</th>
					<th>交易时间</th>
					<th>操作员编号</th>
				</tr>
				<c:forEach var="accountTransinfo" items="${page.pageContent}">
					<tr height="20px">
						<td>${accountTransinfo.transId}</td>
						<td>${accountTransinfo.accountNo }</td>
						<td>
							<c:if test="${accountTransinfo.transType == 'A'}">追加资金</c:if>
							<c:if test="${accountTransinfo.transType == 'B'}">取出资金</c:if>
							<c:if test="${accountTransinfo.transType == 'C'}">认购基金</c:if>
							<c:if test="${accountTransinfo.transType == 'D'}">赎回基金</c:if>
						</td>
						<td>${accountTransinfo.transAmount }</td>
						<td>${accountTransinfo.transTime }</td>
						<td>${accountTransinfo.operCode }</td>
					</tr>
				</c:forEach>
			</table>
			
			 <div id="pageinfo">
	                            共${page.totalRecNum}条, 当前显示${page.startIndex}-${page.endIndex}条, 第${page.pageNo}/${page.totalPageNum}页
	           |
	           <c:if test="${page.pageNo>1}">
	             <span class="linkspan" onclick="doQuery(1)">首页</span>&nbsp;
	           </c:if>
	           <c:if test="${page.prePage}">
	             <span class="linkspan" onclick="doQuery(${page.pageNo-1})">上一页</span>&nbsp;
	           </c:if>
	           <c:if test="${page.nextPage}">
	             <span class="linkspan" onclick="doQuery(${page.pageNo+1})">下一页</span>&nbsp;
	           </c:if>
	           <c:if test="${page.pageNo!=page.totalPageNum}">
	             <span class="linkspan" onclick="doQuery(${page.totalPageNum})">末页</span>&nbsp;
	           </c:if>
	           |
	                             到<input type="text" id="pageNo" size=4 style="text-align:right;" onkeypress="onlynumber();"/> 页
	           <button onclick="doQuery($('pageNo').value);"> 跳 转 </button>		           		           	           	              
	        </div>
		</div>
	</div>
</body>
</html>